<%@page import="DAL.*" errorPage="_Error.jsp"%>
<%@page import="java.util.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="../Style/EditStyle.css"/>
<script type="text/javascript" src="/SPORT/Script/jquery-1.10.1.js"></script>
<script type="text/javascript">
	$(function()
	{		
		//取消按钮点击事件
		$("#btnCancel").click(function()
		{
			location.href="/SPORT/ApplyHandle?type=4";//点击后跳转至ScheduleHandle Servlet页面
		});
	});
</script>

</head>
<body>
	<%
		response.setCharacterEncoding("UTF-8");//设置输出编码格式
		String SchId=request.getParameter("SchId").toString();//获取url传过来的SchId
	        DAL.Schedule schedule=new DAL.Schedule();//实例化Schedule对象
	        List<Object> scheduleList=schedule.getEntityById(SchId);//根据ID获取Schedule数据
	        Object[] obj=(Object[])scheduleList.get(0);//将List数据转换成Object[]
	        
	 %>
	 <form action="/SPORT/ApplyHandle?type=2" method="post">
		<table style=" margin:50px auto;">
	            <tbody>
			 <tr><td>报名编号：</td><td><input type="text" name="SchId" value="<%=obj[0] %>" readonly="readonly" /></td></tr>
			 <tr><td>运动员姓名：</td><td>
			 	<input type="hidden" name="PlayerId" value="<%=obj[1] %>" />
			 	<input type="text" value="<%=obj[5] %>"  readonly="readonly"/>
			 </td></tr>
			 <tr><td>项目名称：</td><td>
			 	<input type="hidden" name="MathId" value="<%=obj[2] %>" />
			 	<input type="text"  value="<%=obj[6] %>" readonly="readonly" />
			 </td></tr>
			 <tr><td>是否禁赛：</td><td>
			 	<select name="IsLimit">
	                	<%
	                		if(obj[3].toString().equals("0"))
	                		{
	                			out.write("<option value='0' selected='selected'>否</option>");
	                			out.write("<option value='1'>是</option>");
	                		}
	                		else
	                		{
	                			out.write("<option value='0'>否</option>");
	                			out.write("<option value='1'  selected='selected'>是</option>");
	                		}
	                	 %>
	                	 </select>
			 </td></tr>
			 <tr><td>参赛次序：</td><td><input type="text" name="sequence" value="<%=obj[4] %>"  required /></td></tr>
		    </tbody>   
	            
	            <tfoot>
	                <tr><td><input type="submit" value="确定" id="btnSure"/></td><td><input type="button" value="取消" id="btnCancel"/></td></tr>
	            </tfoot> 
	        </table>
     </form>
</body>
</html>
